doctype xml
feed(xmlns="http://www.w3.org/2005/Atom")
    title= site.name
    link(href="#{site.url}")
    link(type="application/atom+xml",rel="self",href="#{site.url}/atom.xml")
    updated= site.date.toISOString()
    id= site.url
    author
        name= site.author
        email= site.email
    each item in getCollection('posts').toJSON()
        entry
            id= site.url + item.url
            if item.meta.layout == 'link'
                link(type='text/html',rel='alternate',href='#{item.ref_url}')
            else
                link(type='text/html',rel='alternate',href='#{site.url + item.url}')
            title= item.title
            updated= moment(item.date).utc().format()
            author
                name= site.author
                uri= site.url + item.url
            if item.meta.layout == 'photograph'
                content(type='html')
                    :cdata
                        <p><img width="#{item.photograph_max_width}" height="#{item.photograph_max_height}" alt="#{item.title}" src="#{site.url+largepath+item.photograph}"/></p>!{item.contentRenderedWithoutLayouts}
            else
                content(type='html')
                    :cdata
                        !{item.contentRenderedWithoutLayouts}